package com.tedu.admin.controller;

import com.tedu.admin.service.AdminService;
import com.tedu.common.response.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

@RestController
@RequestMapping("v1/system")
public class LoginController {

    @Autowired
    private AdminService adminService;
	
    @PostMapping("/login")
    public JsonResult accountLogin(@RequestBody Map<String,String> map){
        Map result = adminService.accountLogin(map);
        return JsonResult.ok(result);
    }
}